<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    <title>公告消息</title>

    <link href="${pageContext.request.contextPath}/static/css/common.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/css/bootstrap.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/font-awesome-4.3.0/css/font-awesome.min.css"
          rel="stylesheet">
    <!-- jqgrid-->
    <link href="${pageContext.request.contextPath}/static/plugins/jqGrid/css/custom.ui.jqgrid.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/layer/skin/layer.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/jqGrid/css/style.css" rel="stylesheet">

    <!--[if lt IE 9]>
    <script src="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/js/html5.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/js/respond.min.js"></script>
    <![endif]-->
    <script src="${pageContext.request.contextPath}/static/js/jquery-1.11.3.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/common.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/jqGrid/js/i18n/grid.locale-cn.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/jqGrid/js/minified/jquery.jqGrid.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/layer/layer.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/static/js/jquery.form.js" type="text/javascript"></script>
    <%-- <script src="${pageContext.request.contextPath}/static/plugins/select2-4.0.0/dist/js/select2.min.js"></script>--%>
	<style type="text/css">
	.submit{ 
	  			height: 40px; 
	     		width: 290px; 
	     		font-size: 24px !important; 
	     		font-family: 微软雅黑; 
	     		color:white !important; 
	     		background-color: #62d2fc !important; 
	     		border-color: #62d2fc !important; 
	 			border: 1px solid transparent; 
	 			border-radius: 4px; 
	  		}
	  		.divtitle {
			    padding-left: 15px;
			    background: #fbfbfb;
			    border-bottom: 2px solid #777;
			}
	  		.title1 {
			    color: #333;
			    font-size:2em;
			    margin: 0.5em 1em 0.5em 1em;
			}

	  		.panel-body {
			    padding: 10px 0 15px 0;
			}
	  		.resource-list{
	  			overflow-y: hidden;
			    width: 100%;
			    margin:0;
			    min-height: 200px;
			    position: relative;
	  		}
	  		.resource1 {
			    width: 100%;
			    height: auto;
			    float: left;
			    margin: 0 10px 10px 0;
			    border-bottom: 2px solid #777;
			    position: relative;
			    padding: 0 0 0 2em;
			}
	  		
	  		
	  		.zhaiyao{
			    width: 100%;
			    overflow: hidden;
			    position: relative;
			    font-weight: normal;
			    color: #333;
			    font-size: 1.5em;
			}
	  		.zhaiyaotime{
	  			 font-size: 1.5em;
				 display: block;
				 margin: 0.5em 0 0.5em 0;
				 font-weight: bold;
	  		}
	  		
	  		.div1{
	  			float: left;
	  			width: 85%;
	  		}
	  		.div2{
	  			 text-align: center;
	  		}
	  		.edit{
	  		font-size: 3em;color: black;
	  		}
	  		
	  		
        .box1{
        	text-align: center;
            font-size: 18px;
            width: 100px;
            color: black;
            padding: 10px;
            margin: 10px;
            -webkit-border-radius: 15px;
            -moz-border-radius: 15px;
            background-color: #FBFBFB;
			border: 1px solid balck;
        }
        .box2{
        	text-align: center;
            font-size: 18px;
            width: 100px;
            padding: 10px;
            -webkit-border-radius: 15px;
            -moz-border-radius: 15px;
            background: #D2D2D2;
    		color: black;
   			 border: 1px solid #D2D2D2;
        }
        .box3{
        	text-align: center;
            font-size: 15px;
            width: 100px;
            padding: 10px;
            -webkit-border-radius: 15px;
            -moz-border-radius: 15px;
            background: white;
    		color: black;
    		border: 1px solid #AFAAAA;
        }
        .box4{
        	text-align: center;
		    font-size: 15px !important;
		    width: 61px;
		    height: 28px;
		    -webkit-border-radius: 15px;
		    -moz-border-radius: 15px !important;
		    background: white;
		    color: black !important;
		    border: 1px solid #AFAAAA;
        }
		.box1:hover{color: black;}
		.box2:hover{color: black;}
		.li1{
			padding: 0 4px !important;
		}
		.list1{
			padding: 8px 0 0;
		}
		.inputDisable{
			cursor: not-allowed !important;
		}
		.left ul li{
			
			*line-height:40px;
			
			*padding-left:20px;
		}
		
		.left ul li a, .left ul li a:hover{
			*color:#fff;
		}
		 
	</style>
</head>
<body view="menu-item-4852">
<jsp:include page="../../top.jsp"></jsp:include>
<div class="right">
    <div style="border: 1px solid #e7e7e7;padding: 0;min-height: 500px;*margin-left:270px">
        <div class="list-header">
            <div class="divtitle">
                <h5 class="title1">公告通知</h5>
                <div class="resource_tools">
                    <ul id="action">
                    </ul>
                </div>
            </div>
        <div class="panel-body">
            <div class="resource-list">
                <c:forEach items="${page.recordList}" var="map" varStatus="status">
                    <div class="resource1">
                        <div class="div1">
	                        <span class="zhaiyao" >${map.abstractMsg}
	                        </span>
	                        <span class="zhaiyaotime" >${map.ctime}
	                        </span>
                        </div>
                        <div class="div2">
                        <c:forEach items="${buttonMap}" var="button" varStatus="status">
                        	<c:if test="${button.mName == '公告修改' && (userRole==5||userRole==6)}">
	                        	<a id="edit" class="edit" onclick="edit(${map.sid})">
	                        	<i class="glyphicon glyphicon glyphicon-edit">
	                        	</i>
	                        	</a>
                        	</c:if>
                        	<c:if test="${button.mName == '公告详情'}">
	                        	<a id="detail" class="edit" onclick="detail(${map.sid})">
	                        	<i class="glyphicon glyphicon-eye-open">
	                        	</i>
	                        	</a>
                        	</c:if>
                        	
                        	</c:forEach>
                        </div>
                    </div>
                </c:forEach>
            </div>
            <c:if test="${page.recordList.size() > 0}">
                <div class="page_field" style="text-align: center;*margin-left:300px">
                    <nav>
                        <ul class="pagination pagination-lg">
                            <!--上一页-->
                            <c:if test="${page.currentPage == 1}">
                                <li class="disabled">
                                    <a href="#" aria-label="Previous">
                                        <span aria-hidden="true">&laquo;</span>
                                    </a>
                                </li>
                            </c:if>
                            <c:if test="${page.currentPage != 1}">
                                <li>
                                    <a onclick="page(${page.currentPage-1})" aria-label="Previous">
                                        <span aria-hidden="true">&laquo;</span>
                                    </a>
                                </li>
                            </c:if>


                            <c:forEach begin="${page.beginPageIndex}" end="${page.endPageIndex}" step="1" var="v">
                                <c:if test="${page.currentPage == v}">
                                    <li class="active"><a href="#">${v}</a></li>
                                </c:if>
                                <c:if test="${page.currentPage != v}">
                                    <li><a onclick="page(${v})">${v}</a></li>
                                </c:if>
                            </c:forEach>

                            <!-下一页--->
                            <c:if test="${page.currentPage == page.pageCount}">
                                <li class="disabled">
                                    <a href="#" aria-label="Next">
                                        <span aria-hidden="true">&raquo;</span>
                                    </a>
                                </li>
                            </c:if>
                            <c:if test="${page.currentPage != page.pageCount}">
                                <li>
                                    <a onclick="page(${page.currentPage+1})" aria-label="Next">
                                        <span aria-hidden="true">&raquo;</span>
                                    </a>
                                </li>
                            </c:if>
                        </ul>
                    </nav>
                </div>
            </c:if>
        </div>
    </div>
</div>
</div>
<script type="text/javascript">
    $(document).ready(
            function () {

            });

    function page(page) {
    	 window.location.href = "${pageContext.request.contextPath}/admin/userMsg_listNoticeView.action?page=" + page;
    }


    <!--修改数据记录-->
    function edit(sid) {
    	post('${pageContext.request.contextPath}/admin/userMsg_editView.action', {'sid':sid});
    }
    <!--修改数据记录-->
    function detail(sid) {
    	post('${pageContext.request.contextPath}/admin/userMsg_noticeDetailView.action', {'sid':sid});
    }
    
</script>
</body>
</html>
